/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package queenb.net.entitybean;

import java.io.Serializable;
import java.sql.Date;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import oracle.jdbc.OracleTypes;
import queenb.net.annotation.Mapping;
import queenb.net.datacontrol.DataControl;

/**
 *
 * @author Nguyen Hung
 */
public class M575 extends DataControl<M575> implements Serializable {

    @Mapping(name = "pm575", typeMapping = OracleTypes.INTEGER)
    private int pm575;
    @Mapping(name = "pm275", typeMapping = OracleTypes.INTEGER)
    private int pm275;
    @Mapping(name = "ff150", typeMapping = OracleTypes.INTEGER)
    private int ff150;
    @Mapping(name = "mv576", typeMapping = OracleTypes.CHAR)
    private String mv576;
    @Mapping(name = "fm525", typeMapping = OracleTypes.CHAR)
    private String fm525;
    @Mapping(name = "mv577", typeMapping = OracleTypes.CHAR)
    private String mv577;
    @Mapping(name = "mv578", typeMapping = OracleTypes.CHAR)
    private String mv578;
    @Mapping(name = "mv579", typeMapping = OracleTypes.CHAR)
    private String mv579;
    @Mapping(name = "md580", typeMapping = OracleTypes.CHAR)
    private String md580;
    @Mapping(name = "ml596", typeMapping = OracleTypes.DATE)
    private Date ml596;
    @Mapping(name = "mn581", typeMapping = OracleTypes.INTEGER)
    private int mn581;
    @Mapping(name = "fh000", typeMapping = OracleTypes.INTEGER)
    private int fh000;
    @Mapping(name = "fh200", typeMapping = OracleTypes.INTEGER)
    private int fh200;
    @Mapping(name = "fb050", typeMapping = OracleTypes.INTEGER)
    private int fb050;
    @Mapping(name = "fq100", typeMapping = OracleTypes.INTEGER)
    private int fq100;
    @Mapping(name = "mv276", typeMapping = OracleTypes.CHAR)
    private String mv276;
    @Mapping(name = "mv277", typeMapping = OracleTypes.CHAR)
    private String mv277;
    @Mapping(name = "mv281", typeMapping = OracleTypes.CHAR)
    private String mv281;
    @Mapping(name = "mv282", typeMapping = OracleTypes.CHAR)
    private String mv282;
    // SMAIL, MAIL
    @Mapping(name = "smail", typeMapping = OracleTypes.CHAR)
    private String smail;
    @Mapping(name = "mail", typeMapping = OracleTypes.CHAR)
    private String mail;
    @Mapping(name = "hoten", typeMapping = OracleTypes.CHAR)
    private String hoten;
    @Mapping(name = "ten", typeMapping = OracleTypes.CHAR)
    private String ten;
    @Mapping(name = "title", typeMapping = OracleTypes.CHAR)
    private String title;
    @Mapping(name = "html", typeMapping = OracleTypes.CHAR)
    private String html;
    @Mapping(name = "text", typeMapping = OracleTypes.CHAR)
    private String text;
    @Mapping(name = "sendtime", typeMapping = OracleTypes.DATE)
    private Date sendtime;
    @Mapping(name = "tousers", typeMapping = OracleTypes.CHAR)
    private String tousers;
    @Mapping(name = "mdoc", typeMapping = OracleTypes.INTEGER)
    private int mdoc;
    @Mapping(name = "rowss", typeMapping = OracleTypes.INTEGER)
    private int rowss;
    private String tousserbrief = "";
    private String hotebrief = "";
    private String titlemail;
    private String listrevice;

    /**
     * @return the pm575
     */
    public int getPm575() {
        return pm575;
    }

    /**
     * @param pm575 the pm575 to set
     */
    public void setPm575(int pm575) {
        this.pm575 = pm575;
    }

    /**
     * @return the ff150
     */
    public int getFf150() {
        return ff150;
    }

    /**
     * @param ff150 the ff150 to set
     */
    public void setFf150(int ff150) {
        this.ff150 = ff150;
    }

    /**
     * @return the mv576
     */
    public String getMv576() {
        return mv576;
    }

    /**
     * @param mv576 the mv576 to set
     */
    public void setMv576(String mv576) {
        this.mv576 = mv576;
    }

    /**
     * @return the mv577
     */
    public String getMv577() {
        return mv577;
    }

    /**
     * @param mv577 the mv577 to set
     */
    public void setMv577(String mv577) {
        this.mv577 = mv577;
    }

    /**
     * @return the mv578
     */
    public String getMv578() {
        return mv578;
    }

    /**
     * @param mv578 the mv578 to set
     */
    public void setMv578(String mv578) {
        this.mv578 = mv578;
    }

    /**
     * @return the mv579
     */
    public String getMv579() {
        return mv579;
    }

    /**
     * @param mv579 the mv579 to set
     */
    public void setMv579(String mv579) {
        this.mv579 = mv579;
    }

    /**
     * @return the md580
     */
    public String getMd580() {
        return md580;
    }

    /**
     * @param md580 the md580 to set
     */
    public void setMd580(String md580) {
        this.md580 = md580;
    }

    /**
     * @return the mn581
     */
    public int getMn581() {
        return mn581;
    }

    /**
     * @param mn581 the mn581 to set
     */
    public void setMn581(int mn581) {
        this.mn581 = mn581;
    }

    /**
     * @return the fh000
     */
    public int getFh000() {
        return fh000;
    }

    /**
     * @param fh000 the fh000 to set
     */
    public void setFh000(int fh000) {
        this.fh000 = fh000;
    }

    /**
     * @return the fh200
     */
    public int getFh200() {
        return fh200;
    }

    /**
     * @param fh200 the fh200 to set
     */
    public void setFh200(int fh200) {
        this.fh200 = fh200;
    }

    /**
     * @return the fb050
     */
    public int getFb050() {
        return fb050;
    }

    /**
     * @param fb050 the fb050 to set
     */
    public void setFb050(int fb050) {
        this.fb050 = fb050;
    }

    /**
     * @return the fq100
     */
    public int getFq100() {
        return fq100;
    }

    /**
     * @param fq100 the fq100 to set
     */
    public void setFq100(int fq100) {
        this.fq100 = fq100;
    }

    /**
     * @return the fm525
     */
    public String getFm525() {
        return fm525;
    }

    /**
     * @param fm525 the fm525 to set
     */
    public void setFm525(String fm525) {
        this.fm525 = fm525;
    }

    /**
     * @return the mv276
     */
    public String getMv276() {
        return mv276;
    }

    /**
     * @param mv276 the mv276 to set
     */
    public void setMv276(String mv276) {
        this.mv276 = mv276;
    }

    /**
     * @return the mv277
     */
    public String getMv277() {
        return mv277;
    }

    /**
     * @param mv277 the mv277 to set
     */
    public void setMv277(String mv277) {
        this.mv277 = mv277;
    }

    /**
     * @return the hoten
     */
    public String getHoten() {
        return hoten;
    }

    /**
     * @param hoten the hoten to set
     */
    public void setHoten(String hoten) {
        this.hoten = hoten;
    }

    /**
     * @return the title
     */
    public String getTitle() {
        return title;
    }

    /**
     * @param title the title to set
     */
    public void setTitle(String title) {
        this.title = title;
    }

    /**
     * @return the html
     */
    public String getHtml() {
        return html;
    }

    /**
     * @param html the html to set
     */
    public void setHtml(String html) {
        this.html = html;
    }

    /**
     * @return the text
     */
    public String getText() {
        return text;
    }

    /**
     * @param text the text to set
     */
    public void setText(String text) {
        this.text = text;
    }

    /**
     * @return the sendtime
     */
    public Date getSendtime() {
        return sendtime;
    }

    /**
     * @param sendtime the sendtime to set
     */
    public void setSendtime(Date sendtime) {
        this.sendtime = sendtime;
    }

    /**
     * @return the ml596
     */
    public Date getMl596() {
        return ml596;
    }

    /**
     * @param ml596 the ml596 to set
     */
    public void setMl596(Date ml596) {
        this.ml596 = ml596;
    }

    /**
     * @return the tousers
     */
    public String getTousers() {

        return tousers;
    }

    /**
     * @param tousers the tousers to set
     */
    public void setTousers(String tousers) {
        this.tousers = tousers;
    }

    /**
     * @return the tousserbrief
     */
    public String getTousserbrief() {
        try {
            String[] str;
            String st = "";
            if (tousers != null) {
                if (tousers.contains("<br>")) {
                    str = tousers.split("<br>");
                    if (str.length > 1) {
                        tousserbrief = str[0] + ",...";
                    }
                } else {
                    tousserbrief = tousers;
                }
                return tousserbrief;
            } else {
                return "INDENTIFY";
            }
        } catch (Exception e) {
            System.err.println("Error from getTousserbrief: " + e.getMessage());
            return "INDENTIFY";
        }


    }

    /**
     * @param tousserbrief the tousserbrief to set
     */
    public void setTousserbrief(String tousserbrief) {
        this.tousserbrief = tousserbrief;
    }

    /**
     * @return the touserlist
     */
//    public List<String> getTouserlist() {
//        String[] str;
//        List<String> list = new ArrayList<String>();
//        if (tousers.contains("<br>")) {
//            str = tousers.split("<br>");
//            if (str.length > 1) {
//                for(int i = 0 ; i<tousers.length();i++) {
//                    list.add(str[i] + ", ");
//                }
//            }
//
//        }else{
//            list.add(tousers);
//        }
//        touserlist = list;
//        return touserlist;
//    }
//
//    /**
//     * @param touserlist the touserlist to set
//     */
//    public void setTouserlist(List<String> touserlist) {
//        this.touserlist = touserlist;
//    }
    /**
     * @return the titlemail
     */
    public String getTitlemail() {
        if (title.length() > 100) {
            titlemail = title.substring(0, 100);
        }
        return titlemail;
    }

    /**
     * @param titlemail the titlemail to set
     */
    public void setTitlemail(String titlemail) {
        this.titlemail = titlemail;
    }

    /**
     * @return the ten
     */
    public String getTen() {
        return ten;
    }

    /**
     * @param ten the ten to set
     */
    public void setTen(String ten) {
        this.ten = ten;
    }

    /**
     * @return the listrevice
     */
    public String getListrevice() {
        if (tousers != null) {
            listrevice = tousers.replaceAll("<br>", " , ");
            return listrevice;
        } else {
            return "";
        }

    }

    /**
     * @param listrevice the listrevice to set
     */
    public void setListrevice(String listrevice) {
        this.listrevice = listrevice;
    }

    /**
     * @return the pm275
     */
    public int getPm275() {
        return pm275;
    }

    /**
     * @param pm275 the pm275 to set
     */
    public void setPm275(int pm275) {
        this.pm275 = pm275;
    }

    /**
     * @return the mdoc
     */
    public int getMdoc() {
        return mdoc;
    }

    /**
     * @param mdoc the mdoc to set
     */
    public void setMdoc(int mdoc) {
        this.mdoc = mdoc;
    }

    /**
     * @return the hotebrief
     */
    public String getHotebrief() {
        try {
            if (hoten.length() > 30) {
                hotebrief = hoten.substring(0, 30);
            } else {
                hotebrief = hoten;
            }
            return hotebrief;
        } catch (Exception e) {
            System.err.println("Error from getHotebrief: " + e.getMessage());
            return "INDENTIFY";

        }

    }

    /**
     * @param hotebrief the hotebrief to set
     */
    public void setHotebrief(String hotebrief) {
        this.hotebrief = hotebrief;
    }

    /**
     * @return the rowss
     */
    public int getRowss() {
        return rowss;
    }

    /**
     * @param rowss the rowss to set
     */
    public void setRowss(int rowss) {
        this.rowss = rowss;
    }

    /**
     * @return the mv281
     */
    public String getMv281() {
        return mv281;
    }

    /**
     * @param mv281 the mv281 to set
     */
    public void setMv281(String mv281) {
        this.mv281 = mv281;
    }

    /**
     * @return the mv282
     */
    public String getMv282() {
        return mv282;
    }

    /**
     * @param mv282 the mv282 to set
     */
    public void setMv282(String mv282) {
        this.mv282 = mv282;
    }

    /**
     * @return the smail
     */
    public String getSmail() {
        return smail;
    }

    /**
     * @param smail the smail to set
     */
    public void setSmail(String smail) {
        this.smail = smail;
    }

    /**
     * @return the mail
     */
    public String getMail() {
        return mail;
    }

    /**
     * @param mail the mail to set
     */
    public void setMail(String mail) {
        this.mail = mail;
    }
}
